@frames.js/debugger
Version:
Debug your Frames.js applications
1 lines • 6.36 kB
JavaScript
;(()=>{var e={};e.id=8099,e.ids=[8099],e.modules={85890:e=>{e.exports=require("better-sqlite3")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},6113:e=>{e.exports=require("crypto")},6005:e=>{e.exports=require("node:crypto")},49411:e=>{e.exports=require("node:path")},49463:(e,t,r)=>{r.r(t),r.d(t,{headerHooks:()=>v,originalPathname:()=>h,patchFetch:()=>j,requestAsyncStorage:()=>g,routeModule:()=>z,serverHooks:()=>m,staticGenerationAsyncStorage:()=>b,staticGenerationBailout:()=>f});var a={};r.r(a),r.d(a,{GET:()=>p});var i=r(95419),s=r(69108),n=r(99678),o=r(53797),c=r(12725),l=r(72274),u=r(49974);let d=o.z.array(o.z.discriminatedUnion("type",[o.z.object({id:o.z.string().uuid(),type:o.z.literal("notification"),notification:u.M}),o.z.object({id:o.z.string().uuid(),type:o.z.literal("event"),event:c._G}),o.z.object({id:o.z.string().uuid(),type:o.z.literal("event_success"),eventId:o.z.string().uuid(),event:c._G}),o.z.object({id:o.z.string().uuid(),type:o.z.literal("event_failure"),event:c._G,eventId:o.z.string().uuid(),message:o.z.string(),response:o.z.object({status:o.z.number(),headers:o.z.record(o.z.union([o.z.string(),o.z.array(o.z.string())])),body:o.z.string()}).optional()})]));async function p(e,{params:t}){let r=await (0,l.c)(e.nextUrl.href),a=await r.listEvents(t.namespaceId);return Response.json(d.parse(a))}let z=new i.AppRouteRouteModule({definition:{kind:s.x.APP_ROUTE,page:"/notifications/[namespaceId]/events/route",pathname:"/notifications/[namespaceId]/events",filename:"route",bundlePath:"app/notifications/[namespaceId]/events/route"},resolvedPagePath:"/Users/davidfurlong/Projects/active/frames.js/packages/debugger/app/notifications/[namespaceId]/events/route.ts",nextConfigOutput:"",userland:a}),{requestAsyncStorage:g,staticGenerationAsyncStorage:b,serverHooks:m,headerHooks:v,staticGenerationBailout:f}=z,h="/notifications/[namespaceId]/events/route";function j(){return(0,n.patchFetch)({serverHooks:m,staticGenerationAsyncStorage:b})}},13264:(e,t,r)=>{r.d(t,{nr:()=>a,cL:()=>i,KS:()=>G,cN:()=>f,GN:()=>h,MV:()=>j,Tn:()=>y,_G:()=>I});var a={};r.r(a),r.d(a,{S:()=>n,R:()=>o});var i={};r.r(i),r.d(i,{R:()=>c});class s extends Error{name="BaseError";cause;constructor(e,t={}){super(e,t.cause?{cause:t.cause}:void 0),this.cause=t.cause}}class n extends s{name="AddFrame.InvalidDomainManifest";constructor(){super("Invalid domain manifest")}}class o extends s{name="AddFrame.RejectedByUser";constructor(){super("Add frame rejected by user")}}class c extends s{name="SignIn.RejectedByUser";constructor(){super("Sign in rejected by user")}}var l=r(53797);let u=l.z.string().url().startsWith("https://",{message:"Must be an https url"}).max(512),d=l.z.string().max(32),p=l.z.string().max(32),z=l.z.string().regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i,{message:"Invalid hex color code. It should be in the format #RRGGBB or #RGB."}),g=l.z.object({header:l.z.string(),payload:l.z.string(),signature:l.z.string()});l.z.object({fid:l.z.number(),type:l.z.literal("app_key"),key:l.z.string().startsWith("0x")});let b=l.z.object({type:l.z.literal("launch_frame"),name:d,url:u,splashImageUrl:u.optional(),splashBackgroundColor:z.optional()}),m=l.z.discriminatedUnion("type",[b]),v=l.z.object({title:p,action:m}),f=l.z.object({version:l.z.literal("next"),imageUrl:u,button:v}),h=l.z.object({url:l.z.string(),token:l.z.string()}),j=l.z.object({notificationId:l.z.string().max(128),title:l.z.string().max(32),body:l.z.string().max(128),targetUrl:u,tokens:l.z.string().array().max(100)}),y=l.z.object({result:l.z.object({successfulTokens:l.z.array(l.z.string()),invalidTokens:l.z.array(l.z.string()),rateLimitedTokens:l.z.array(l.z.string())})}),x=l.z.object({event:l.z.literal("frame_added"),notificationDetails:h.optional()}),P=l.z.object({event:l.z.literal("frame_removed")}),U=l.z.object({event:l.z.literal("notifications_enabled"),notificationDetails:h.required()}),k=l.z.object({event:l.z.literal("notifications_disabled")}),I=l.z.discriminatedUnion("event",[x,P,U,k]),w=l.z.object({version:l.z.union([l.z.literal("0.0.0"),l.z.literal("0.0.1"),l.z.literal("1"),l.z.literal("next")]),name:d,iconUrl:u,homeUrl:u,imageUrl:u.optional(),buttonTitle:p.optional(),splashImageUrl:u.optional(),splashBackgroundColor:z.optional(),webhookUrl:u.optional()}),G=l.z.object({accountAssociation:g,frame:w.optional()})},49974:(e,t,r)=>{r.d(t,{G:()=>n,M:()=>s});var a=r(13264),i=r(53797);let s=a.MV.extend({targetUrl:i.z.string().url()}),n=a.GN.extend({url:i.z.string().url()})},72274:(e,t,r)=>{r.d(t,{c:()=>a});async function a(e){let{KV_REST_API_TOKEN:t,KV_REST_API_URL:a}=process.env;return t&&a?(await r.e(4096).then(r.bind(r,14096))).getStorage(t,a,e):(await Promise.all([r.e(2725),r.e(9842)]).then(r.bind(r,79842))).getStorage(e)}},93245:(e,t,r)=>{r.d(t,{G:()=>a});class a extends Error{constructor(e,t={}){let r=(()=>{if(t.cause instanceof a){if(t.cause.details)return t.cause.details;if(t.cause.shortMessage)return t.cause.shortMessage}return t.cause?.message?t.cause.message:t.details})(),i=t.cause instanceof a&&t.cause.docsPath||t.docsPath,s=`https://oxlib.sh${i??""}`;super([e||"An error occurred.",...t.metaMessages?["",...t.metaMessages]:[],...r||i?["",r?`Details: ${r}`:void 0,i?`See: ${s}`:void 0]:[]].filter(e=>"string"==typeof e).join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:"ox@0.1.1"}),this.cause=t.cause,this.details=r,this.docs=s,this.docsPath=i,this.shortMessage=e}walk(e){return function e(t,r){return r?.(t)?t:t&&"object"==typeof t&&"cause"in t&&t.cause?e(t.cause,r):r?null:t}(this,e)}}}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[1638,9947,2725],()=>r(49463));module.exports=a})();